package cn.gitee.ffmpeg.processed.handler;

import cn.gitee.ffmpeg.processed.dto.ComposeVideoDTO;
import cn.gitee.ffmpeg.processed.manager.FFmpegManager;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * @author xuhainan
 * @date 2023/7/28 15:35
 * @region hefei
 */

@Component
@RequiredArgsConstructor
public class FFmpegVideoHandler extends ProcessedHandler {

    private final FFmpegManager fFmpegManager;

    @Override
    public String doProcessed(ProcessedDTO processedDTO) {
        if (processedDTO instanceof ComposeVideoDTO composeVideoDTO) {
            return fFmpegManager.proceedCompletedVideo(composeVideoDTO);
        }
        return null;
    }

    @Override
    public void doCallBack(ProcessedDTO processedDTO) {

    }
}
